import os
import subprocess
import sys
print(" _____ _____          __    _____  _____   ____   _____ ")
print("|_   _|  __ \        / /   |  __ \|  __ \ / __ \ / ____|")
print("  | | | |__) |_   __/ /_   | |  | | |  | | |  | | (___  ")
print("  | | |  ___/\ \ / / '_ \  | |  | | |  | | |  | |\___ \ ")
print(" _| |_| |     \ V /| (_) | | |__| | |__| | |__| |____) |")
print("|_____|_|      \_/  \___/  |_____/|_____/ \____/|_____/ ")
print("                                                        ")
print("                                                        ")
print("         _   _             _    ")
print("    /\  | | | |           | |   ")
print("   /  \ | |_| |_ __ _  ___| | __")
print("  / /\ \| __| __/ _` |/ __| |/ /")
print(" / ____ \ |_| || (_| | (__|   < ")
print("/_/    \_\__|\__\__,_|\___|_|\_\ ")
print("")
print("\033[1;32;40m[*]IPv6 DDoS attack refers to launching attacks on target networks or servers by exploiting vulnerabilities or misconfigurations in the IPv6 protocol, using a large amount of malicious traffic to exhaust their bandwidth, system resources, or service capabilities, thereby rendering them unable to provide normal services or causing network disruptions.")
print("\033[1;37;40m")

files = {
    1: {"name": "ddos/ipv6_attack/ICMPv6_Flood.py", "description": "IPv6 ICMPv6 Flood Attack"},
    2: {"name": "ddos/ipv6_attack/IPv6_Replay_Attack.py", "description": "IPv6 Replay Attack"},
    3: {"name": "ddos/ipv6_attack/IPv6_Flood_Attack.py", "description": "IPv6 Flood Attack"},
    4: {"name": "ddos/ipv6_attack/IPv6_SLAAC_Flood.py", "description": "IPv6 SLAAC Flood Attack"},
    5: {"name": "ddos/ipv6_attack/IPv6_Fragmentation_Attack.py", "description": "IPv6 Fragmentation Attack"},
    6: {"name": "ddos/ipv6_attack/Neighbor_Cache_Exhaustion.py", "description": "IPv6 Neighbor Cache Exhaustion Attack"},
    7: {"name": "ddos/ipv6_attack/IPv6_ND.py", "description": "IPv6 Neighbor Discovery Protocol Attack"},
}


def run_python_file(file_number):
    if file_number in files:
        file_info = files[file_number]
        file_name = file_info["name"]
        file_description = file_info["description"]
        if os.path.exists(file_name) and file_name.endswith('.py'):
            print("Executing...")
            subprocess.run([sys.executable, file_name])
        else:
            print("Error: File does not exist.")
    else:
        print("Error: Invalid choice.")

def main():
    print("Select attack mode:")
    for num, file_info in files.items():
        print(f"[{num}] {file_info['description']}")
    choice = int(input("Enter the number:"))
    run_python_file(choice)

if __name__ == "__main__":
    main()
    
# ©sansjtw https://sansjtw.xyz https://github.com/sansjtw
